Utils::DropSupport Class

class Utils::DropSupport

The DropSupport class makes it easy for a QWidget to accept drops without subclassing QWidget and overriding methods. More...

Header: #include <utils/dropsupport.h>

Static Public Members

bool enforceCopyAction(QDropEvent *event, Utils::DropSupport *ds)

Detailed Description

Member Function Documentation

[static] bool DropSupport::enforceCopyAction(QDropEvent *event, Utils::DropSupport *ds)

A DropFilterFunction that enforces the Qt::CopyAction on the drop, even if the drag source would support the move action. Useful for drop targets that just want to do something with e.g. the file path without actually "taking over" the source.

When the DropSupport ds reports a drop event, it sets the override file drop action of its MIME data to the copy action.

Returns true, meaning that it by default accepts the drop event.